<!--
 * @Description: 
 * @Author: Leequik
 * @Date: 2025-06-15 14:58:30
 * @LastEditTime: 2025-07-07 11:23:24
 * @LastEditors: Leequik
-->
<template>
    <div class="child">
        <h3>子组件1</h3>
        <h5>玩具：{{ toy }}</h5>
        <el-button @click="emitter.emit('send-toy',toy)">玩具给弟弟</el-button>
    </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import emitter from '../../utils/emitter.ts';

let toy = ref('奥特曼');

</script>

<style scoped>
.child {
    background-color: skyblue;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin: 10px;
}
</style>